<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.18"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>embedme: src/Singleton.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">embedme
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.18 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#define-members">Macros</a>  </div>
  <div class="headertitle">
<div class="title">Singleton.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>单例  
<a href="#details">More...</a></p>

<p><a href="_singleton_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_singleton.html">libemb::Singleton&lt; T &gt;</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">单例模板类  <a href="classlibemb_1_1_singleton.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:adbe81dabafd4a18fb17e8780c0a9190d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_singleton_8h.html#adbe81dabafd4a18fb17e8780c0a9190d">DECL_SINGLETON</a>(InstanceClass)&#160;&#160;&#160;private:friend class Singleton&lt;InstanceClass&gt;;InstanceClass();</td></tr>
<tr class="separator:adbe81dabafd4a18fb17e8780c0a9190d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>单例 </p>
<div class="fragment"><div class="line"> 单例使用例程</div>
<div class="line"><span class="keyword">class </span>Dummy: <span class="keyword">public</span> Singleton&lt;Dummy&gt;{</div>
<div class="line"><a class="code" href="_singleton_8h.html#adbe81dabafd4a18fb17e8780c0a9190d">DECL_SINGLETON</a>(Dummy)</div>
<div class="line"><span class="keyword">public</span>:</div>
<div class="line">    <span class="keyword">virtual</span> ~Dummy();</div>
<div class="line">    ...</div>
<div class="line">};</div>
<div class="line">Dummy::Dummy()</div>
<div class="line">{</div>
<div class="line">}</div>
</div><!-- fragment --> </div><h2 class="groupheader">Macro Definition Documentation</h2>
<a id="adbe81dabafd4a18fb17e8780c0a9190d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adbe81dabafd4a18fb17e8780c0a9190d">&#9670;&nbsp;</a></span>DECL_SINGLETON</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DECL_SINGLETON</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">InstanceClass</td><td>)</td>
          <td>&#160;&#160;&#160;private:friend class Singleton&lt;InstanceClass&gt;;InstanceClass();</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>单例模板类子类构造函数定义,用于定义单例模板类子类的构造函数 </p>

</div>
</div>
</div><!-- contents -->
<div class="ttc" id="a_singleton_8h_html_adbe81dabafd4a18fb17e8780c0a9190d"><div class="ttname"><a href="_singleton_8h.html#adbe81dabafd4a18fb17e8780c0a9190d">DECL_SINGLETON</a></div><div class="ttdeci">#define DECL_SINGLETON(InstanceClass)</div><div class="ttdef"><b>Definition:</b> Singleton.h:44</div></div>
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.18
</small></address>
</body>
</html>
